import request from '@/api/index.js'
import store from '@/store'

// 查询货物类型
export const getCargoType = () => {
	return request({
		url: '/base/manageCargoCategory/queryList'
	})
}

// 获取地址列表
export const getLocation = () => {
	const { user } = store()
	return request({
		url: `/applet/reception/addressInfo/list/${user.userInfo.userId}`,
		method: 'get'
	})
}

// 获取自提点列表
export const getPickUp = () => {
	return request({
		url: '/base/selfPickupPoint/list',
		method: 'get'
	})
}

// 获取仓库
export const getWareHouse = () => {
	return request({
		url: '/base/manage/warehouse/list',
		method: 'get'
	})
}


// 查询对应字典
export const getDict = (dictType) => {
	return request({
		url: `/system/dict/data/type/${dictType}`,
		method: 'get'
	})
}
